import { createApp } from 'vue';
import App from './App.vue';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import router from './router';
import store from './store';
import { createPinia } from 'pinia'
import './api/mock'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';

const pinia = createPinia()
const app = createApp(App);
store.commit('addMenu',router)
app.use(ElementPlus, { locale: zhCn });

app.use(pinia)
app.use(router);
app.use(store);
app.mount('#app');

//注册@element-plus/icons-vue图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}